package com.activititest.other;


import com.activititest.appentity.Response;
import com.activititest.entity.VOutfallpoints;
import com.activititest.service.impl.VOutfallpointsServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author mfx
 * @since 2020-10-21
 */
@RestController
@RequestMapping("/outfall")
public class VOutfallpointsController {
    @Autowired
    VOutfallpointsServiceImpl vOutfallpointsService;

    @PostMapping("/getOutFallPoints/")
    public Response<List<VOutfallpoints>> getPoints(@RequestParam("codesource") String codesource){
//        QueryWrapper<VOutfallpoints> queryWrapper =new QueryWrapper<>();
//        queryWrapper.eq("CODE_SOURCE",codesource);
//        List<VOutfallpoints> list = vOutfallpointsService.list(queryWrapper);
        List<VOutfallpoints> list = vOutfallpointsService.list();
        Response euserResponse = new Response();
        euserResponse.setCode(200);
        euserResponse.setData(list);
        euserResponse.setMsg("yes");
        return euserResponse;
    }
}

